package com.example.demo.controller.experycontroller;

import com.example.demo.common.Result;
import com.example.demo.service.ExpertService;
import com.example.demo.vo.UserLoginVo;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.*;

import com.example.demo.utils.JwtUtils;

@RestController
@RequestMapping("/expert/login")
@RequiredArgsConstructor
public class LoginController {
    private final ExpertService expertService;

    @PostMapping
    public Result<UserLoginVo> login(@RequestParam("username") String username, @RequestParam("password") String password) {
        return Result.success(expertService.login(username, password));
    }
}


